using System;
using System.Collections.Generic;

using Atomic.Libraries;
using Atomic.Structures;

namespace Atomic.Clusters.Fitting
{
	[Serializable]
	public class ClusterValidationExpansion : ClusterExpansion
	{
		private ClusterValidationExpansion()
			: base(null, null) // FIXME
		{
		}

		public static ClusterValidationExpansion Fit(IEnumerable<Structure> structures, IEnumerable<double> energies, IEnumerable<ClusterClass> clusters)
		{
			//return Fit(new List<Structure>(structures).ToArray(), new List<double>(energies).ToArray(), new List<ClusterClass>(clusters).ToArray());
			throw new NotImplementedException();
		}

		public static ClusterValidationExpansion Fit(IDictionary<Structure, double> energies, IEnumerable<ClusterClass> clusters)
		{
			// Proper order guaranteed:
			// http://msdn.microsoft.com/en-us/library/ekcfxy3x.aspx
			return Fit(energies.Keys, energies.Values, clusters);
		}

		public double ClusterValidationScore
		{
			get;
			private set;
		}

		public ReadOnlyDictionary<Atom, double> ReferenceEnergies
		{
			get;
			private set;
		}
	}
}
